<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0">
    <style type="text/css">
      html, body {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        margin: 0;
        padding: 0;
      }
      button {
        display: block;
        width: 100%;
        padding: 20px;
        font-size: 50px;
      }
    </style>
</head>
<body>
    <script src="./jsbridge.js"></script>
    <script type="text/javascript">

    function onClickButton(button) {
        if (button.innerText == "UI.toast") {
          JSBridge.UI.toast('This is toast!')
        }
    }
    </script>

    <!-- 打算点击按钮调用native -->
    <button onclick="onClickButton(this)">UI.toast</button>
</body>
</html>